//
//  TGImageTool.m
//  大众点评
//
//  Created by scsys on 15/1/29.
//  Copyright (c) 2015年 http://www.scjy.net尚承教育. All rights reserved.
//

#import "TGImageTool.h"
#import "UIImageView+WebCache.h"


@implementation TGImageTool

+ (void)downloadImage:(NSString *)url placeholder:(UIImage *)place imageView:(UIImageView *)imageView
{
    [imageView setImageWithURL:[NSURL URLWithString:url] placeholderImage:place options:SDWebImageLowPriority | SDWebImageRetryFailed];
}

+ (void)clear
{
    // 1.清除内存中的缓存图片
    [[SDImageCache sharedImageCache] clearMemory];
    
    // 2.取消所有的下载请求
    [[SDWebImageManager sharedManager] cancelAll];
}

@end
